﻿namespace Ngs.Extensions
{
    using System;

    public static class Extensions
    {
        static Extensions()
        {
        }

        public static T AsGenericType<T>(this object obj) where T : class
        {
            T item = obj as T;
            ExceptionFactory.ThrowInvalidOperation(obj == null);
            return item;
        }
    }
}
